'use strict';
/**
 * 项目配置详情
 */
const path = require('path');
const resolve = dir => path.join(__dirname, dir);

const conf = require('./config/projectConfig');
module.exports = {
  pages: conf.pages,
  productionSourceMap: false,
  lintOnSave: false,
  devServer: {
    port: 9011, // 端口
    open: false, // 启动后打开浏览器
    index: "index.html", // 默认启动serve 打开index页面
    overlay: {
      //  当出现编译器错误或警告时，在浏览器中显示全屏覆盖层
      warnings: false,
      errors: true
    },
    proxy: {
      //配置跨域
      '/api': {
        target: "https://test.xxx.com",
        // ws:true,
        changOrigin: true,
        pathRewrite: {
          '^/api': '/'
        }
      }
    }
  },
  chainWebpack: config => {
    config.resolve.alias
      .set("@", resolve("src"));
  }
};
